/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author has
 */
@Entity
@Table(name = "contactus", catalog = "onsale", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Contactus.findAll", query = "SELECT c FROM Contactus c"),
    @NamedQuery(name = "Contactus.findByIdContactUs", query = "SELECT c FROM Contactus c WHERE c.idContactUs = :idContactUs"),
    @NamedQuery(name = "Contactus.findByNamaContactUs", query = "SELECT c FROM Contactus c WHERE c.namaContactUs = :namaContactUs"),
    @NamedQuery(name = "Contactus.findByEmailContactUs", query = "SELECT c FROM Contactus c WHERE c.emailContactUs = :emailContactUs"),
    @NamedQuery(name = "Contactus.findByKomentarContactUs", query = "SELECT c FROM Contactus c WHERE c.komentarContactUs = :komentarContactUs")})
public class Contactus implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idContactUs", nullable = false)
    private Integer idContactUs;
    @Basic(optional = false)
    @Column(name = "namaContactUs", nullable = false, length = 50)
    private String namaContactUs;
    @Basic(optional = false)
    @Column(name = "emailContactUs", nullable = false, length = 50)
    private String emailContactUs;
    @Basic(optional = false)
    @Column(name = "komentarContactUs", nullable = false, length = 500)
    private String komentarContactUs;

    public Contactus() {
    }

    public Contactus(Integer idContactUs) {
        this.idContactUs = idContactUs;
    }

    public Contactus(Integer idContactUs, String namaContactUs, String emailContactUs, String komentarContactUs) {
        this.idContactUs = idContactUs;
        this.namaContactUs = namaContactUs;
        this.emailContactUs = emailContactUs;
        this.komentarContactUs = komentarContactUs;
    }

    public Integer getIdContactUs() {
        return idContactUs;
    }

    public void setIdContactUs(Integer idContactUs) {
        this.idContactUs = idContactUs;
    }

    public String getNamaContactUs() {
        return namaContactUs;
    }

    public void setNamaContactUs(String namaContactUs) {
        this.namaContactUs = namaContactUs;
    }

    public String getEmailContactUs() {
        return emailContactUs;
    }

    public void setEmailContactUs(String emailContactUs) {
        this.emailContactUs = emailContactUs;
    }

    public String getKomentarContactUs() {
        return komentarContactUs;
    }

    public void setKomentarContactUs(String komentarContactUs) {
        this.komentarContactUs = komentarContactUs;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idContactUs != null ? idContactUs.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Contactus)) {
            return false;
        }
        Contactus other = (Contactus) object;
        if ((this.idContactUs == null && other.idContactUs != null) || (this.idContactUs != null && !this.idContactUs.equals(other.idContactUs))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.Contactus[ idContactUs=" + idContactUs + " ]";
    }
    
}
